package com.ruoyi.house.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.house.domain.CfContractEntity;
import com.ruoyi.house.domain.CfContractsEntity;
import com.ruoyi.house.dto.request.MyPayYHRequestDto;
import com.ruoyi.house.dto.request.RequestDetailCfContractSearchDto;
import com.ruoyi.house.dto.request.RequestSearchCfContractDto;
import com.ruoyi.house.dto.response.*;
import javafx.scene.control.Pagination;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author liufeng
 * @since 2018-04-16
 */
@Mapper
public interface CfContractMapper extends BaseMapper<CfContractEntity> {

	public List<ResponseDetailCfContractSearchDto> searchCfContract(Pagination pagination,
																	RequestDetailCfContractSearchDto requestDetailCfContractSearchDto);

	/**
	 * 
	 * @Description: 分页 - 列表
	 * @param param
	 * @return List<PageCfContractResponse>
	 */
	List<PageCfContractResponse> findPage(Map<String, Object> param);

	/**
	 * 
	 * @Description: 分页 - 总数
	 * @param param
	 * @return Integer
	 */
	Integer count(Map<String, Object> param);

	/**
	 * 
	 * @Description:我的租约
	 * @parm @param businessBaseParam
	 * @parm @return 参数
	 * @return 返回值说明
	 */
	List<MyCfContractDtoResponse> myCfContractSearch(String mobile);

	/**
	 * 
	 * @Description:租客信息查询
	 * @parm @param cfContractId
	 * @parm @return 参数
	 * @return 返回值说明
	 */
	CfContractSelectResponseDto myCfContractSearchInfo(Long cfid);

	/**
	 * 新增收款计划 查询 合同信息
	 * 
	 * @return
	 */
	CfContractsEntity selectSearchById(Long cfContractId);

	/**
	 * 
	 * @Description: 查询 - 最新的合同
	 * @return CfContractsEntity
	 */
	List<CfContractEntity> selectRoomId(Map<String, Object> param);

	/**
	 * 
	 * @Description: 查询 - 最新的合同
	 * @return CfContractsEntity
	 */
	Integer checkStatus(Map<String, Object> param);

	/**
	 * 金融业务：查询没有使用过金融业务的出房合同分页列表
	 * @param pagination 分页信息
	 * @param requestSearchCfContractDto 小区名称、租客姓名
	 * @return 分页数据
	 */
	public List<ResponseSearchCfContractDto> searchCfContract4Finance(Pagination pagination,
																	  RequestSearchCfContractDto requestSearchCfContractDto);

	public CfContractEntity getTenant(Long id);

	public MyPayYHResponseDto getYHNo(MyPayYHRequestDto myPayYHRequestDto);

	public int findLeaseRoomMonth(String format1, Integer businessId);

	public int findLeaseRoomYear(String format1, String format2, Integer businessId);

	public int findAllTenant(String format3, String format2, Integer businessId);

	public int findTenant(String format3, String format2, Integer businessId);

	public List<FrequencyResponseDto> findFrequency(String format3, String format2, Integer businessId);


}
